<style>
 textarea {min-height: 85px; min-width: 350px; max-height: 160px; max-width: 440px;}
 td {padding-bottom:15px}
</style>
<?if ($this->status):?>
<div id="email-congrat" style="    color: #8E0313;    font-size: 22px;    font-weight: bold;    margin-bottom: 25px;  margin-left: 173px;
    text-shadow: 1px 1px 4px #FFFFFF;    ">Your message was sended!</div>

<?endif;?>
<script>
  var contactussubject;
  var contactusemail;
  var contactusmessage;

$(function(){


   



   $('input[type=submit] ').click(function(){
        contactusmessage=$('textarea').val();
        contactusemail=$('input[type=email]').val();
        if((contactusemail)&&(contactusmessage))
        {
            if ((contactusemail.length>4)&&(contactusmessage.length>4))
            {
                 $('form').attr('onsubmit','return true');
            }

            else{
                $('#error').css('display','block');
                $('form').attr('onsubmit','return false');
             }
        }
//       alert(contactusemail.length + "" + contactusmessage.length);

   });
});
</script>
<div id="error" style="font-weight: bold;color: red;margin-left: 171px;display: none;margin-bottom: 20px;">Please, fill all fileds correctly</div>

<div  style="margin-left: 122px;">
<form  method="post" action="" >
<table style="">
<tr>
<td><label for="name-guest">Name:</label></td>
<td><input  type="text" placeholder="Name" value="" name="name-guest"/></td>
</tr>
<tr>
<td><label for="email-guest">Email:</label></td>
<td><input id="email-guest" type="email" placeholder="Email" value="" name="email-guest"/></td>
</tr>
<tr>
    <td colspan="2"><label for="text-guest">Text:</label></td>
</tr>
<tr>
    <td colspan="2"><textarea name="text-guest" id="text-guest" rows="3" cols="25" placeholder="Text"></textarea></td>
</tr>
<tr>
    <td colspan="2"><center><input type="submit" value="Send" ></center></td>
</tr>

</table>

</form>
</div>